home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Shareware
/
Business Shareware.iso
/
start
/
hobby
/
golftrac
/
lo171.doc
< prev
next >
Wrap
Text File
|
1990-11-17
|
43KB
|
907 lines
LL OOOOOO GGGGGG OOOOOO UU UU TTTTTTTT
LL OO OO GG GG OO OO UU UU TT
LL OO OO GG OO OO UU UU TT
LL OO OO GG OO OO UU UU TT
LL OO OO GG GGGG OO OO UU UU TT
LL LL OO OO GG GG OO OO UU UU TT
LLLLLLLL OOOOOO GGGGGG OOOOOO UUUUUU TT
Copyright (c) 1988-1990 Byte_Magic Software. All rights reserved.
Version 1.71
Greg Messer
Byte_Magic Software
9850 Meadowglen Ln. #35
Houston, Texas 77042
(713) 975-9033
Table of Contents
───────────────────────────────────────────────────────────────
LogOut Overview ........................ Page 1
Usage and Parameters ................... Page 2
The Time Limit ......................... Page 3
The Keystroke File ..................... Page 4
The Current Keystroke ID ............... Page 5
The Repeat Mode ........................ Page 6
The Immediate Mode ..................... Page 7
The Include and Exclude Device Lists ... Page 8
Combinations of Parameters ............. Page 9
Keystroke File Structure ............... Page 10
General Hints .......................... Page 11
Technical Information .................. Page 12
Sample Keystroke File ............... Appendix A
Interrupt 61h Services .............. Appendix B
Packing List ........................ Appendix C
LogOut Overview Page 1
───────────────────────────────────────────────────────────────
LogOut (LO.COM) is a memory resident program
designed to send keystrokes to the keyboard
buffer of a PC after a specified period of
inactivity has been exceeded.
When LogOut sends the keystrokes, the result is
the same as if someone were typing the keys at
the keyboard. The application cannot tell the
difference. The only exceptions to this are
programs that move the keyboard buffer.
"Inactivity" is defined here as no keyboard,
disk, screen or printer activity. If no one is
typing and the disk drives, screen and printer
are not being used, the system is considered to
be inactive. This definition of inactivity is
configurable as explained below in the section on
the 'N' and 'X' command line parameters.
LogOut is installed in memory the first time it
is run and the installed portion is simply
updated on each subsequent run. Although it
cannot remove itself from memory, LogOut can be
disabled at any time by specifying a time limit
of 0, as explained below in the section on the
'T' command line parameter. LogOut normally uses
less than 1024 bytes of memory after
installation. This depends on the size of the
environment at load time - more about this later
in the general hints section.
Each time it is run, LogOut needs to know how
long to wait, what keys to send when the time
limit is up, and other things. This information
is supplied on the command line.
In the rest of this documentation, LogOut will be
explained in increasing detail. First, the basic
usage of LogOut will be shown, and the command
line parameters will be briefly described. Then
each command line parameter will be described in
detail, followed by a discussion of the
interactions of the parameters when used in
combination. Finally, the technical foundations
of LogOut will be explained for those who would
like to add to the capabilities of the program.
LogOut was originally written in 1988 as a
network security program to back users out of any
application when they were not working or were
possibly no longer at their desks; hence the
name. LogOut has grown in capability since then,
and a little experimentation will reveal many
uses for this unique program.
Usage and Parameters Page 2
───────────────────────────────────────────────────────────────
Usage: LO [T=mmm] [F=filename.ext] [C=ID] [R=(yn)]
[I=(yn)] [N=device] [X=device] [?]
T=mmm This is the Time in minutes of inactivity before
keys are sent. The default time limit is 30
minutes. On each run, the time limit is left as
is unless a new time is entered. Entering T=0
disables LogOut until a new time is entered.
F=filename This is the Filename of the keystroke file. The
default filename is 'LOGOUT.DAT'. Drive and path
may be included, up to 127 characters.
C=ID This is the Current keystroke ID. The default
current keystroke ID is 'DEF'. Uppercase and
lowercase characters are NOT considered equal.
R=(yn) This is the Repeat mode setting, and can be 'Y',
'y', 'N', or 'n'. 'Y' means repeat the keys
after each time period of activity passes. 'N'
is the default, keys are only sent once, then
LogOut must be run again to reset the timer and
reenable LogOut.
I=(yn) This is the Immediate mode setting, and can be
'Y', 'y', 'N', or 'n'. 'Y' means stuff the
keyboard immediately. 'N' is the default, keys
are not sent immediately.
N=dev. This is the iNcluded device list. The specified
devices are included for activity watching.
Valid entries for 'dev.' are D, K, P and S for
Disk, Keyboard, Printer and Screen respectively.
X=dev. This is the eXcluded device list. The specified
devices are excluded from activity watching.
Valid entries for 'dev.' are D, K, P and S for
Disk, Keyboard, Printer and Screen respectively.
? This is the Help parameter. When '?' is entered
on the command line a help screen will be shown.
The installed state of LogOut will be unchanged.
Entering 'H' or 'h', or no parameters at all,
will also produce the help screen.
Parameters may be entered in upper or lower case.
Only the keystroke ID is case-sensitive.
Invalid or unsupported parameters will cause
LogOut to be disabled, for safety. Messages will
be displayed to signal any errors.
The Time Limit Page 3
───────────────────────────────────────────────────────────────
┌─────────┐
LO │ [T=mmm] │ [F=filename.ext] [C=ID] [R=(yn)]
└─────────┘
[I=(yn)] [N=device] [X=device] [?]
The time parameter tells LogOut the maximum
period of inactivity, in minutes, that can pass
before timeout occurs. After that time period
expires the keystrokes are sent to the PC's
keyboard buffer.
For example, entering T=25 tells LogOut to wait
for 25 minutes of inactivity to pass before
sending keystrokes.
The default time limit of 30 minutes is used
if the time limit is not specified on the first
run. The time limit remains the same on
subsequent runs unless specifically reset. Once
the time limit is changed, it will remain the
same until it is changed again.
Entering "T=0" will disable LogOut until the time
is reset. Subsequent runs that do not specify a
time limit, zero or otherwise, will set the time
back to the default 30 minutes.
LogOut may be installed with "T=0" on the first
run in order to get it loaded early without it
being enabled.
The maximum time limit is 65,535 minutes,
specified as T=65535. This is 1,092 hours and
fifteen minutes, or about 45 and one half days,
which should be plenty.
If the time limit specified on the command line
is non-numeric, LogOut will be disabled and an
error message will be displayed.
The Keystroke File Page 4
───────────────────────────────────────────────────────────────
┌──────────────────┐
LO [T=mmm] │ [F=filename.ext] │ [C=ID] [R=(yn)]
└──────────────────┘
[I=(yn)] [N=device] [X=device] [?]
The keystroke file parameter tells LogOut where
to find the keystrokes to be sent upon timeout.
The default keystroke file is LOGOUT.DAT. If
another file contains the desired key codes, then
the F=filename.ext parameter tells LogOut to use
that file. Be aware that LogOut must read a
keystroke file in order to change the current
keystrokes to be sent. If a new current
keystroke ID is specified on the command line and
another data file is being used, you must also
specify that filename. LogOut will not
automatically look for the previously used
keystroke file.
The maximum keystroke file size is 10,240 bytes.
The keystroke file contains keystroke IDs and
their corresponding key codes as shown below:
ID=aaa,sss,[aaa,sss,aaa,sss,...],255
The "ID" term is the current keystroke's ID.
This ID represents the keys to be sent upon
timeout while inside a particular program or
during a particular situation.
The "aaa,sss" terms are the ASCII and scan code
pairs for each key to be sent when the time limit
is reached.
The '255' is required to mark the end of a line.
(This is changed from earlier versions of LogOut
which used a '4' for end-of-line.)
If the keystroke file specified on the command
line is not found or an I/O error occurs, LogOut
will be disabled and an error message will be
displayed.
Appendix A is a sample keystroke file.
The Current Keystroke ID Page 5
───────────────────────────────────────────────────────────────
┌────────┐
LO [T=mmm] [F=filename.ext] │ [C=ID] │ [R=(yn)]
└────────┘
[I=(yn)] [N=device] [X=device] [?]
The current keystroke ID tells LogOut which
keystroke sequence in the keystroke file to send
upon timeout.
The default current keystroke ID is "DEF". If a
filename is specified on the command line and a
current keystroke ID is not, then LogOut will
look for "DEF" in the specified file. LogOut
will not automatically look for the previously
used current keystroke ID.
The term "ID" must exactly match an ID in the
keystroke file, and the ID comparison is case
sensitive. For example, 'pgm1' is NOT equal to
'PGM1'. The ID of the current keystroke sequence
may be up to 31 characters in length.
Each keystroke sequence must have a unique ID for
LogOut to work. If two situations share the same
ID, LogOut will only use the first occurrence of
that ID in the file, ignoring all others. If
there is no way to avoid duplicate IDs, then put
one in uppercase letters and the other in
lowercase. This is enough to differentiate the
two IDs.
If the current keystroke ID specified on the
command line does not occur in the keystroke
file, LogOut will be disabled and an error
message will be displayed.
The Repeat Mode Page 6
───────────────────────────────────────────────────────────────
┌──────────┐
LO [T=mmm] [F=filename.ext] [C=ID] │ [R=(yn)] │
└──────────┘
[I=(yn)] [N=device] [X=device] [?]
The Repeat mode parameter tells LogOut whether to
send the keys after every timeout period until
activity resumes, or to only send the keys once,
then stop. The argument for the repeat mode can
be either 'Y', 'y', 'N', or 'n'.
The default is R=N. In this mode, once the
timeout period expires the keys are sent. After
those keys are sent, LogOut must be run from the
command line again to reset the timer and
reenable the sending of keys.
With R=Y, the keys will be sent after the first
timeout as above. However, if the time period
expires again and there is still no activity, the
keys will be sent again. If the user resumes
working without running LogOut from the command
line, then leaves the system inactive again, the
keys will be sent after the next timeout occurs.
Repeat mode is intended for use as a continuous
event. For example, LogOut could save work in a
word processor, spreadsheet or database each time
the user pauses to think for longer than the time
period, providing a useful automatic save feature
for programs which do not already have one.
The Immediate Mode Page 7
───────────────────────────────────────────────────────────────
LO [?] [T=mmm] [F=filename.ext] [C=ID] [R=x]
┌──────────┐
│ [I=(yn)] │ [N=device] [X=device] [?]
└──────────┘
The immediate mode tells LogOut to send the keys
immediately, without waiting for the time limit
to expire.
The default is I=N, for no immediate send of
keys. If I=Y is entered, then the keys will be
sent immediately - probably before LogOut even
finishes running! The keys will be waiting there
for whatever program first reads the keyboard.
That may be DOS, or a menu program, or
practically anything else.
Be aware that many programs clear the keyboard
buffer before reading the keyboard. This is a
safety measure on their part. In these cases,
the keys LogOut immediately sent will be cleared
out and will appear to have not been sent.
Experimentation will detect this.
The Include and Exclude Device Lists Page 8
───────────────────────────────────────────────────────────────
LO [?] [T=mmm] [F=filename.ext] [C=ID] [R=x]
┌───────────────────────┐
[I=(yn)] │ [N=device] [X=device] │ [?]
└───────────────────────┘
The include and exclude device lists are used to
tell LogOut to include or exclude particular
devices from being watched for activity.
The device list may contain D, K, P and S for
disk, keyboard, printer and screen watching
respectively.
It is important to know the order that the
devices are processed. First, the excluded
devices are set up, then the included devices are
set up. This means that if the same device is
specified as both included and excluded, it will
end up being included in the devices being
watched for activity.
The default is N=DKPS, so all supported devices
are watched.
Some programs run for a long time, like menu
systems, and they may do things like keep a clock
on the screen, or write a log file occasionally.
To allow LogOut to detect that the system is
inactive in these situations, it may be necessary
to exclude the active device from watching.
The exclude feature should be used with caution.
It is possible for database programs, for
example, to work on an update for a long period
of time. It could be disastrous for LogOut to
attempt to exit the program during such a
process, but if disk and screen watching were
turned off that could very well happen! The
ultimate responsibility rests with the person who
runs LogOut. It can only do as it is told.
The include feature allows including devices that
were excluded in previous runs.
If N and X are used frequently, it is safest to
use them on every run to explicitly state on each
run what is to be included or excluded, rather
than rely on the order of runs to maintain the
included and excluded device lists.
Combinations of Parameters Page 9
───────────────────────────────────────────────────────────────
Combining F=filename.ext and C=ID
The F and C parameters should be used as a pair
unless the default value is to be used for the
unused parameter.
For example, if C is used and not F, then LogOut
will look for the supplied current keystroke ID
in the default keystroke file "LOGOUT.DAT".
Conversely, if F is used and not C, LogOut will
look in the supplied keystroke file for the
default current keystroke ID "DEF".
Combining T=mmm, I=(yn) and R=(yn)
Entering I=Y will result in an immediate send of
keystrokes, unless T=0 is entered on the same run
to disable LogOut altogether.
Subsequent sending of keystrokes depends on the
R=(yn) parameter. If R=Y was entered on the same
run, then the keystrokes will be sent again upon
each timeout, as specified by the T=mmm
parameter. But, if R=N was entered instead, the
T=mmm parameter will be ignored and keys will not
be sent again after the immediate send. The
immediate send is the only send in that case.
Combining N=device and X=device
The excluded devices are evaluated first, then
the included devices. So, if a device is
specified as both included and excluded, it will
end up being included when LogOut is finished
with the run. This was deemed the safest
behavior, and more convenient than ending with an
error.
Combining T=0 with any other parameter
If T=0 is specified to disable LogOut, any other
parameters specified at the same time are still
evaluated. They will be set just as they were
entered, except that LogOut will not act on them
because it is disabled. If enabled with T=mmm
other than '0', then the parameters will already
be set to the earlier state.
Keystroke File Structure Page 10
───────────────────────────────────────────────────────────────
Each line of the keystroke file has the following
structure:
ID=aaa,sss,[aaa,sss,aaa,sss,...],255
The "ID" terms are unique keystroke IDs that
identify a keystroke sequence.
The "aaa,sss" terms are the ASCII code, scan code
pair for each key in a keystroke sequence. The
required '255' marks the end of a line of key
codes. The ID is separated from the key codes by
the equal ('=') sign and the keycodes are
separated from each other by commas. A maximum
of 15 characters may be sent by LogOut, so this
adds up to 30 codes. Then there is the '255', so
the total number of codes after the equal sign is
31. The codes may be less than three digits.
The utility program KEYS.EXE has been provided to
enable any key code to be found. KEYS will show
the key and the ASCII code and scan code for the
key. Type a <Ctrl-Break> to exit from KEYS. The
codes returned are the ones that must be put in
the keystroke file. Each key that is to be sent
consists of these two codes. It is the
responsibility of the person who maintains the
keystroke file to enter the correct codes, LogOut will
send exactly what is entered.
Hint: use <Ctrl-PrtSc> to print the codes on the
printer. Or, use redirection ('|' or '>' or '>>'
on the command line - see your DOS manual) to
send the codes to the printer or to a file.
A sample keystroke file is shown in appendix A, and in
the file LOGOUT.DAT supplied with this program.
If you intend to use comments in the keystroke file,
then imitate the ones in the sample file.
By keeping the data in a plain ASCII text file
the user can control exactly what LogOut will do
when the timeout period is reached, either save
or not save work in progress, beep instead of
exit, or even execute a program from the DOS
prompt.
General Hints Page 11
───────────────────────────────────────────────────────────────
'Sticky' Parameters
The parameters used by LogOut remain set in their
current state until explicitly changed. If, for
example, X=D is entered to exclude disk activity
watching, then disk activity watching will remain
excluded until explicitly included. The only
exception is if LogOut is disabled with T=0. If
a subsequent run does not specify a time limit,
the time will automatically be set to the default
30 minutes.
Efficient Memory Usage
It is best to load this and all other memory
resident programs with as small an environment as
possible. A copy of the environment is loaded
with each TSR, and on some machines that can be
quite a lot of space.
For TSRs loaded from AUTOEXEC.BAT, this is easy,
just load the TSRs before setting any environment
variables (the lines containing the SET command:
SET somename=something). After the TSRs are
loaded, then set the environment.
LogOut facilitates this by allowing itself to be
loaded in its disabled state, with the T=0
parameter. This way, LogOut can be loaded early
and have no effect until it is needed. It takes
up such a small space this way, less than 1024
bytes, that it is unlikely to cause an out-of-
memory condition by itself. And, if the machine
is out of memory with LogOut installed, it will
almost surely still be out of memory if only
LogOut is removed. It is so small that it just
doesn't make much difference in memory if it is
installed or not.
User Suggestions
If LogOut does not perform as described here, or
if you have a unique requirement, please notify
Byte_Magic Software. All requests for increased
functionality will be entertained, most can be
accommodated. Bug fixes are handled on an
emergency basis - I don't want my programs 'out
there' creating havoc.
Technical Information Page 12
───────────────────────────────────────────────────────────────
The LogOut program is divided into two distinct
parts, the resident part and the initialization
part. The LogOut initialization code has the
following functions:
* Check for an already installed copy of the
LogOut program by looking for the known
interrupt 61h code.
* If not already installed, redirect the 61h
interrupt vector and chain into the 09h,
10h, 13h, 17h and 1Ch interrupt vectors.
These are the user, keyboard, screen,
disk, printer and timer interrupts
respectively.
* Handle the command line arguments, i.e.
load the correct keystroke file, send the
keystroke codes to the resident part, etc.
Not all of these tasks are done for each
run. Changing the time limit, for
example, does not require reading the
keystroke file or changing the keystrokes.
If no arguments are present or there is an
error in one of them, disable LogOut and
display an appropriate error message.
* If being installed on this run, terminate
and stay resident, leaving only the
resident code in memory. Otherwise, just
terminate normally.
Subsequent runs of LogOut, after the first run,
merely alter the resident code that was installed
on the first run.
Technical Information (continued) Page 13
───────────────────────────────────────────────────────────────
The resident code is the set of above-mentioned
interrupt handlers. The interrupt 09h, 10h, 13h,
and 17h handlers, if not excluded with the 'X'
command line parameter, simply reset the elapsed
time counter to zero each time a key is pressed,
or the screen is updated, or a disk drive is
accessed, or the printer is used.
The timer interrupt handler (1Ch) is used to keep
track of elapsed time since the last activity.
It also sends the key codes to the keyboard
buffer area in memory if the time limit is
exceeded (as long as LogOut has not been
disabled).
The user interrupt (61h) handler is used to
communicate between the resident and non-resident
parts of LogOut. It is one of several interrupts
defined by IBM as user interrupts and is unused
by nearly all software. In LogOut, this
interrupt performs thirteen different services,
selected by the value in the AH register when
called. These services are shown in appendix B.
Any other program can be written to use these
interrupt 61h services provided LogOut is
installed first.
The interrupt 61h handler DOES NOT chain to a
previously installed handler. LogOut will not
install itself if this interrupt is already being
used. This is because there is no documented way
for this interrupt to be cooperatively used.
With no existing guidelines for cooperation, it
would be very unlikely that LogOut and another
program could work in harmony.
LogOut's interrupt 61h services are listed in
appendix B so that other programmers can
use them if desired. LogOut would need to be
loaded ahead of any other software that is
written to use these services. Interrupt 61h
services above AH=13 are ignored by this version
of LogOut, so additional capabilities can be
implemented as higher numbered services without
conflict. Function numbers higher than about
150 are recommended for compatibility with future
versions. LogOut continues to gain in
functionality, and each new function needs a new
function number for the interrupt 61h
communication service. Function numbers will be
implemented in sequence, but the need for numbers
above 150 is doubtful in this interrupt handler.
Sample Keystroke File Appendix A
───────────────────────────────────────────────────────────────
;LOGOUT.DAT__LOGOUT_KEYSTROKE_FILE
DEF=7,34,255
BEEP=7,34,255
BEEPBEEP=7,34,7,34,255
DTP=27,1,0,79,0,79,0,79,255
EM=0,60,81,16,13,28,0,79,0,79,0,79,255
GT=27,1,27,1,27,1,27,1,0,79,0,79,0,79,255
HT=27,1,70,33,0,79,0,79,0,79,255
MT=27,1,27,1,27,1,0,79,0,79,0,79,255
PFS=27,1,27,1,27,1,27,1,69,18,89,21,0,79,0,79,0,79,255
WP=0,68,13,28,89,21,0,65,78,49,89,21,0,79,0,79,0,79,255
Q_SAVE=0,33,83,31,255
PCWRITE_SAVE=0,59,0,61,255
;DEF=DEFAULT
;BEEP=BEEP_ONCE
;BEEPBEEP=BEEP_TWICE
;DTP=DESKTOP_PUBLISHING
;EM=E-MAIL
;GT=GTAM
;HT=HURRICANE_TRACKER
;MT=MASTER_TYPE
;PFS=PFS_PROFESSIONAL_WRITE_AND_FILE
;WP=WORDPERFECT=WP
;Q_SAVE=QEDIT_AUTOSAVE
;PCWRITE_SAVE=PCWRITE_AUTOSAVE
Interrupt 61h Services Appendix B
───────────────────────────────────────────────────────────────
AH SERVICE
── ─────────────────────────────────────────────────
00 Does nothing. May be used by another version of
LogOut in the future.
01 Returns the segment and offset of the storage
area for the keys' ASCII and scan code pairs.
SEGMENT:OFFSET returned in DX:AX. (Note: this is
changed from previous versions which used AX:DX -
an abnormal register usage.)
02 Changes the TIME_PERIOD. The DX register must
contain the new Time limit as input.
03 Returns the current TIME_PERIOD in AX.
04 Temporarily disables LogOut until a new
TIME_PERIOD is set. Puts 0 in TIME_PERIOD also.
05 Returns 6161h in AX to indicate that this is the
right interrupt 61h for LogOut. This service is
simply an identification service. A return value
of other than 6161h signals that interrupt 61h is
being used by another program.
06 Sets the REPEAT_FLAG. The DL register must
contain 1 to set Repeat mode ON, and 0 to set
Repeat mode OFF.
07 Returns the REPEAT_FLAG, repeat mode setting, in
the AL register.
08 Sets the IMMEDIATE_FLAG. The DL register must
contain 1 to set Immediate mode ON, and 0 to set
Immediate mode OFF.
09 Returns the IMMEDIATE_FLAG, immediate mode setting,
in the AL register.
10 Enable/disable disk watching. The DL register must
contain 1 to enable watching, 0 to disable watching.
11 Enable/disable keyboard checking. The DL register must
contain 1 to enable watching, 0 to disable watching.
12 Enable/disable printer checking. The DL register must
contain 1 to enable watching, 0 to disable watching.
13 Enable/disable screen checking. The DL register must
contain 1 to enable watching, 0 to disable watching.
14-255 Does nothing in LogOut as of v1.71.
Packing List Appendix C
───────────────────────────────────────────────────────────────
LogOut is sent in the following archive:
LO171.ZIP .... LogOut archive file
The archive includes the following files:
LO.COM ....... LogOut executable program.
LO171.DOC .... This file - documentation for LogOut v1.71.
LOGOUT.DAT ... Sample keystroke file, can be used as is
or as a stable starting point.
KEYS.EXE ..... Utility program to show key codes to use
for keystrokes in the keystroke file.
If these files were not all there upon extraction of the
archive, please notify the source of the LogOut archive
that their copy is not valid and cannot be supported by
Byte_Magic Software, the original author of the program.
Also, please notify Byte_Magic Software so that a
complete copy can be supplied.
LL OOOOOO GGGGGG OOOOOO UU UU TTTTTTTT
LL OO OO GG GG OO OO UU UU TT
LL OO OO GG OO OO UU UU TT
LL OO OO GG OO OO UU UU TT
LL OO OO GG GGGG OO OO UU UU TT
LL LL OO OO GG GG OO OO UU UU TT
LLLLLLLL OOOOOO GGGGGG OOOOOO UUUUUU TT
Copyright (c) 1988-1990 Byte_Magic Software. All rights reserved.
Version 1.71
Greg Messer
Byte_Magic Software
9850 Meadowglen Ln. #35
Houston, Texas 77042
(713) 975-9033
This is version is freeware - copyright, but you may freely use it for your
personal use.
Distributed by Public (software) Library with permission of the author.
Public (software) Library
P.O.Box 35705 - F
Houston, TX 77235-5705
For a copy of the latest monthly software library newsletter
and a list of the 2,500+ disks in the library, call or write
Orders Only:
1-800-2424-PSL
FAX: 713-524-6398
CompuServe: 71355,470
MC/Visa/AmEx/Discover
Outside of U.S. or in Texas
or for general information,
Call 1-713-524-6394
PsL also has an outstanding
catalog for the Macintosh.